if __name__ == '__main__':
    print("开始学习公共的方法！！！");

    s = {"name":"gaohq","age":32,"weight":190};

    my_tuple = (34,12,"222ww",23.90);

    my_list = ["222",23,"f",3.49];

    print("字典的s的长度是 %d,元组my_tuple的长度是 %d,列表 my_list 的长度是 %d" %(len(s),len(my_tuple),len(my_list)))


    del (s["name"]);
    del my_list[1];
    #元组不能删除只能查询
    #del my_tuple[1];
    print(s);
    print(my_list);
    print(my_tuple);
    my_list.insert(1,23);
    del s;
    #print(s); 这里会报错，报 not defined;

    print(my_list[1:3]);

    print(my_tuple[:2]);

    my_tuple1 = (1,1,1,1,1,1,1);
    print(my_tuple1);

    my_list.append("222");
    print(my_list);

    print("ww" in my_list);

    if not "www" in my_list:
        print("www包含")

    if "www" not in my_list:
        print("不包含");
    find_name = "gaohq";
    students_info = [{"name":"gaohq"},{"name":"和丽叶"},{"name":"gaoss"}];
    for s_info in students_info:
        print(s_info);
        if(s_info["name"] == find_name):
            print("找到了 %s" %s_info["name"]);
            #找到会退出循环
            break;
    else:
        print("抱歉没有找到 %s" %find_name);


